package br.com.odontosul.entity;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.jboss.seam.annotations.Name;

@Entity
@Table(name="consulta")
@Name("consulta")
	@NamedQuery(name="retornaConsultas", query="from consulta")
public class Consulta {

	private Long id;
	private Date dataConsulta;
	private Long paciente;
	private Date horaConsulta;
	private String observacoes;
	private String nomePaciente; 

	@Id  
    @SequenceGenerator( name = "consulta_id", sequenceName = "consulta_seq", allocationSize = 1 )  
    @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "consulta_id" )  
    @Column( name = "id", nullable = false )
    public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	public String getNomePaciente() {
		return nomePaciente;
	}

	public void setNomePaciente(String nomePaciente) {
		this.nomePaciente = nomePaciente;
	}

	@Column(name="dt_consulta")
	public Date getDataConsulta() {
		return dataConsulta;
	}
	
	public void setDataConsulta(Date dataConsulta) {
		this.dataConsulta = dataConsulta;
	}
	
	public Long getPaciente() {
		return paciente;
	}
	
	public void setPaciente(Long paciente) {
		this.paciente = paciente;
	}
	
	@Column(name="hora")
	public Date getHoraConsulta() {
		return horaConsulta;
	}
	
	public void setHoraConsulta(Date horaConsulta) {
		this.horaConsulta = horaConsulta;
	}
	
	@Column(name="obs_consulta")
	public String getObservacoes() {
		return observacoes;
	}
	
	public void setObservacoes(String observacoes) {
		this.observacoes = observacoes;
	}
}
